<template>
	<view id="printBox" class="table_content_main">
		<!-- <view class="table_content_main_title fonts24 fontw700">{{ vo1.fullName }}标准简历</view> -->
		<table class="table_content_mains">
			<tr class="">
				<th class="th1">姓名</th>
				<td class="td1">{{ vo1.fullName || "无" }}</td>
				<th class="th1">性别</th>
				<td class="td1">{{ dict(vo1.gender, "sys_user_sex") || "无" }}</td>
				<th class="th1">年龄</th>
				<td class="td1">{{ vo1.age || "无" }}</td>
				<th rowspan="3" class="thImge">
					<div style="width:127px;height: 168px;">
						<img style="width: 100%;height: 100%;" v-if="vo1.photoUrl" :src="vo1.photoUrl" alt="" />
						<!-- <img style="width: 100%;height: 100%;" v-else src="@/assets/imgs/k1.png" alt="" /> -->
					</div>
				</th>
			</tr>
			<tr class="">
				<th class="th1">民族</th>
				<td class="td1">{{ vo1.nation || "无" }}</td>
				<th class="th1">籍贯</th>
				<td class="td1">{{ vo1.nativePlace || "无" }}</td>
				<th>婚姻状况</th>
				<td class="td1">{{ dict(vo1.marriage, "marriage") || "无" }}</td>
			</tr>
			<tr class="">
				<th class="th1">政治面貌</th>
				<td class="td1">{{ dict(vo1.politicalOutlook, "political_outlook") || "无" }}</td>
				<th class="th1">参加工作时间</th>
				<td class="td1">{{ vo1.startWorkTime || "无" }}</td>
				<th class="th1">健康状况</th>
				<td class="td1">{{ vo1.health || "无" }}</td>
			</tr>
			<tr class="">
				<th class="th1">电子邮箱</th>
				<td class="td1" colspan="2">{{ vo1.email || "无" }}</td>
				<th class="th1">熟悉专业/有何专长</th>
				<td class="td1" colspan="3">{{ vo1.majorAndSpecialty || "无" }}</td>
			</tr>
			<tr class="">
				<th class="th1" rowspan="2">身份证号</th>
				<td class="td1" rowspan="2" colspan="2">{{ vo1.idNumber || "无" }}</td>
				<th class="th1">现住地址</th>
				<td class="td1" colspan="3">{{ vo1.currentAddress || "无" }}</td>
			</tr>
			<tr class="">
				<th class="th1">户籍地址</th>
				<td class="td1" colspan="3">{{ vo1.registeredAddress || "无" }}</td>
			</tr>
			<tr class="">
				<th class="th1">联系电话</th>
				<td class="td1" colspan="2">{{ vo1.phoneNumber || "无" }}</td>
				<th class="th1">紧急联系人及电话</th>
				<td class="td1" colspan="3">{{ vo1.emergencyPhoneNumber || "无" }}</td>
			</tr>
			<tr class="">
				<th class="th1">职业资格/专业技术（职称）</th>
				<td class="td1" colspan="2">无</td>
				<th class="th1">重点人群信息</th>
				<td class="td1" colspan="3">{{ dict(vo1.keyPopulationInformation,
		                    "key_population_information") || "无"
		                }}</td>
			</tr>
			<tr class="">
				<th class="th1" :rowspan="vo2.length + 1">教育经历</th>
				<td class="td2" colspan="6" v-if="vo2.length == 0">
					无
				</td>
			</tr>
			<tr class="" v-for="(item, index) in vo2" :key="index">
				<td class="td2" colspan="6">
					{{ dict(item.educationLevel, "education") }} {{ item.experienceStartTime.slice(0, 10) }}-{{
		                       item.experienceEndTime.slice(0, 10) }} {{ item.schoolName }} {{ item.specialFieldName }}<br />
					专业描述：{{ item.specialFieldDescription }} <br />
					学历证书编号：{{ item.xuexinCoding }}<br />
					学历附件：<span style="margin-right: 16px;" v-for="(items, indexs) in item.files" :key="indexs"><a
							:href="items.url">{{ "附件" + (indexs + 1) }}</a>
					</span>
				</td>
			</tr>

			<tr class="">
				<th class="th1" :rowspan="vo3.length + 1">工作履历 （自毕业填起）</th>
				<td class="td2" colspan="6" v-if="vo3.length == 0">
					无
				</td>
			</tr>
			<tr class="" v-for="(item, index) in vo3" :key="index">
				<td class="td2" colspan="6">
					{{ item.experienceStartTime.slice(0, 10) }}-{{
		                       item.experienceEndTime.slice(0, 10) }} {{ item.companyName }} {{ item.positionName }} <br />
					所在部门：{{ item.departmentName }} <br />
					工作描述：{{ item.workDescription }}
				</td>
			</tr>
			<!-- 奖惩情况 -->
			<tr class="">
				<th class="th1">业绩及奖惩情况</th>
				<td class="td2" colspan="6">
					{{ vo4 }}
				</td>
			</tr>
			<!-- 项目经历 -->
			
			<tr class="">
				<th class="th1" :rowspan="vo5.length + 1">项目经历</th>
				<td class="td2" colspan="6" v-if="vo5.length == 0">
					无
				</td>
			</tr>
			<tr class="" v-for="(item, index) in vo5" :key="index">
				<td class="td2" colspan="6">
					{{ item.experienceStartTime.slice(0, 10) }}-{{item.experienceEndTime.slice(0, 10) }} {{ item.projectName }} {{ item.positionName }} <br />
					项目描述：{{ item.projectDescription }}
				</td>
			</tr>
			<!-- 资格证书 -->
			<tr class="">
				<th class="th1" :rowspan="vo6.length + 1">资格证书</th>
				<td class="td2" colspan="6" v-if="vo6.length == 0">
					无
				</td>
			</tr>
			<tr class="" v-for="(item, index) in vo6" :key="index">
				<td class="td2" colspan="6">
					{{ item.certificateName }} {{ item.issuanceTime.slice(0, 10) }} <br />
					颁发单位：{{ item.issuanceUnit }}<br />
					证书描述：{{ item.certificateDescription }}<br />
					资格证书附件：<span style="margin-right: 16px;" v-for="(items, indexs) in item.files" :key="indexs"><a
							:href="items.url">{{ "附件" + (indexs + 1) }}</a>
					</span>
				</td>
			</tr>
			<!-- 培训 -->
			<tr class="">
				<th class="th1" :rowspan="vo7.length + 1">培训经历</th>
				<td class="td2" colspan="6" v-if="vo7.length == 0">
					无
				</td>
			</tr>
			<tr class="" v-for="(item, index) in vo7" :key="index">
				<td class="td2" colspan="6">
					{{ item.experienceStartTime.slice(0, 10) }}-{{
		                       item.experienceEndTime.slice(0, 10) }} {{ item.experienceName }} {{ item.experienceDirections }}
					<br />
					培训描述：{{ item.experienceDescription }} <br />
				</td>
			</tr>
			<!-- 技能 -->
			<tr class="">
				<th class="th1" :rowspan="vo8.length + 1">专业技能</th>
				<td class="td2" colspan="6" v-if="vo8.length == 0">
					无
				</td>
			</tr>
			<tr class="" v-for="(item, index) in vo8" :key="index">
				<td class="td2" colspan="6">
					{{ item.masterTime.slice(0, 10) }} {{ item.skillName }} {{ dict(item.proficiencyLevel,
		                       "proficiency_level") }} <br />
				</td>
			</tr>
			<!-- 自我评价 -->
			<tr class="">
				<th class="th1">自我评价</th>
				<td class="td2" colspan="6">
					{{ vo9 }}
				</td>
			</tr>
			<!-- 家庭关系 -->
			<tr class="">
				<th class="th1" :rowspan="vo10.length + 2">
					<p>家庭主要成员及重要社会关系（未婚/离异填父母、兄弟界面；已婚填配偶、子女）</p>
				</th>

			</tr>
			<tr v-if="vo10.length == 0">
				<td class="td2" colspan="6">
					无
				</td>
			</tr>
			<tr v-if="vo10.length != 0">
				<td class="td2">称谓</td>
				<td class="td2">姓名</td>
				<td class="td2">出生年月</td>
				<td class="td2">政治面貌</td>
				<td class="td2">工作单位及职务</td>
				<td class="td2">联系方式</td>
			</tr>
			<tr class="" v-for="(item, index) in vo10" :key="index">
				<td class="td2">{{ item.title }}</td>
				<td class="td2">{{ item.fullName }}</td>
				<td class="td2">{{ item.brithDay }}</td>
				<td class="td2">{{ item.politicalOutlook }}</td>
				<td class="td2">{{ item.workUnitAndPosition }}</td>
				<td class="td2">{{ item.titcontactInformationle }}</td>
			</tr>
			<!-- 本人承诺 -->
			<tr class="">
				<th class="th1">本人承诺</th>
				<td class="td2" colspan="6">
					&nbsp;&nbsp;&nbsp;&nbsp;
					本人郑重承诺：本人向成都香城人力资源开发有限公司提供应聘简历、身份信息、教育经历、工作履历、证书证件等个人信息完全真实可靠，不存在弄虚作假情况。如证实本人提供的个人信息存在虚假情况，本人愿意承担相应的法律责任。
					<p class="th_b_p">
						<span>本人签名</span>
						<span>年</span>
						<span>月</span>
						<span>日</span>

					</p>
				</td>

			</tr>
		</table>
	</view>
</template>
<script>
	import {
		dictFun
	} from "@/util/dictionary";
	export default {
		props: ["data"],
		data() {
			return {
				vo1: {}, //个人信息
				vo2: {}, //教育经历
				vo3: {}, //工作履历
				vo4: {}, //业绩及奖惩情况
				vo5: {}, //项目经历
				vo6: {}, //资格证书
				vo7: {}, //培训经历
				vo8: {}, //专业技能
				vo9: {}, //自我评价
				vo10: {}, //家庭
				vo11: {}, //本人承诺
			}
		},
		watch: {
			data: {
				handler: function(newValue) {
					console.log("简历", newValue);
					this.vo1 = newValue?.personalInformation
					console.log("个人数据：", this.vo1);
					this.vo2 = newValue?.educationExperiences
					this.vo3 = newValue?.workExperiences //工作
					this.vo4 = newValue?.personalInformation.performanceRewardsPunishments || "无" //业绩及奖惩
					this.vo5 = newValue?.projectExperiences //项目
					this.vo6 = newValue?.certificates //证书
					this.vo7 = newValue?.trainingExperiences //培训
					this.vo8 = newValue?.skills //技能
					this.vo9 = newValue?.personalInformation.selfEvaluation || "无" //自我评价
					this.vo10 = newValue?.familyMembers //家庭
					this.vo11 = newValue?.selfCommitment //本人承诺
				},
				deep: true,
				immediate: true
			}
		},
		methods: {
			dict(value, res) {
				return dictFun(value, res)
			},
			classClick(item) {
				this.indexValue = item.id
			}
		}
	}
</script>
<style lang="scss" scoped>
	.table_content {

		width: 100%;
		background: #FFFFFF;
		border-radius: 0px 0px 0px 0px;
		opacity: 1;
		position: relative;

		.table_content_button {
			position: absolute;
			right: 36px;
			top: 36px;
		}
	}

	table,
	table tr th,
	table tr td {
		border: 1px solid #0094ff;
	}

	table {
		width: auto;
		min-height: 20px;
		line-height: 20px;
		text-align: center;
		border-collapse: collapse;
	}

	.table_content_mains {
		width: 100%;
		border: 1px solid #979797;
		tr {
			.el-row {
				width: 100%;
			}
		}

		.th_b_p {
			text-align: right;
			margin-top: 30px;
			margin-bottom: 20px;
			span {
				margin-left: 20px;
				&:nth-child(1) {
					margin-right: 30px;
				}
			}
		}

		.thImge {
			width: 127px;
			height: 168px;
		}

		.th1 {
			max-width: 30px;
			padding: 5px;
			// width: 11.5%;
			min-height: 50px;
		}


		.td1 {
			// width: 16.9%;
			height: 30px;
		}

		th {
			background: #F4F4F4;
			border-radius: 0px 0px 0px 0px;
			opacity: 1;
			font-size: 12px;
			border: 1px solid #979797;

		}

		td {
			background: #FFFFFF;
			border-radius: 0px 0px 0px 0px;
			opacity: 1;
			text-align: center;
			font-size: 12px;
			border: 1px solid #979797;
		}

		.td2 {
			padding: 10px;
			text-align: left;
		}
	}

	.table_content_main {
		width: 100%;
		// transform: scale(0.8);
		// padding: 16px 16px 16px 16px;
		// transform: scale(1,1);
		// -ms-transform: scale(0.2,0.2); /* IE 9 */
		// -webkit-transform: scale(0.8,0.8); /* Safari and Chrome */
		.table_content_main_title {
			width: 100%;
			text-align: center;
			margin-bottom: 36px;
		}
	}
</style>
